package Sigleton;

public class PrecisionPositioningSystem {
    private static PrecisionPositioningSystem instance;
    private Position currentPosition;

    private PrecisionPositioningSystem() {
        // 私有构造方法
    }

    public static synchronized PrecisionPositioningSystem getInstance() {
        if (instance == null) {
            instance = new PrecisionPositioningSystem();
        }
        return instance;
    }

    public Position getCurrentPosition() {
        return currentPosition;
    }

    public void updatePosition(Position newPosition) {
        this.currentPosition = newPosition;
    }
}
